<template>
	<view>
<!-- 导航栏开始
		<view class="container" style="font-size: 28px;">

			<uni-nav-bar shadow left-icon="left" @clickLeft="back" leftText="返回" rightText="" title="费用详情"
				@clickRight="right()" />
			 <uni-nav-bar shadow left-icon="left" @clickLeft="back" leftText="返回" rightText="我的会议" title="会议室列表"
						@clickRight="right()" />
		</view>
	导航栏开始	 
		 -->
		<uni-section>
			<view v-for="(item, index) in campusList" :key="item.id" :ref="'item'+index" @click="onClick(item.id)">
				<uni-card :title="item.campusName" :isFull="true" :sub-title="item.campusAddress" extra="查看详情"
					:thumbnail="item.campusImgs">
				</uni-card>
			</view>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				campusList: null,
				avatar: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png',
			}
		},
		onLoad() {
			this.findAllCampus();
		},

		methods: {
			onClick(id) {
				console.log(id);
				uni.navigateTo({
					url: "./yiyuandaohang?id=" + id,
					// url: "./details?id=" + e.id,

				})
			},
			findAllCampus() {

				this.$axios
					.post("http://localhost:9000/user/user/campus/findAllCampus")
					.then((response) => {
						this.campusList = response.data.data.list
					}) //请求成功
					.catch((error) => {
						console.log(error);
					}); //请求失败

			},

		}
	}
</script>

<style>

</style>
